<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <title>名人堂</title>
    <link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/base.css?v=15" />
    <link rel="stylesheet" type="text/css" media="screen" href="{$staticHost}/static/css/run.css?v=131" />
    <script src="{$staticHost}/static/js/jquery.min.js"></script>
    <script src="{$staticHost}/static/js/js.js"></script>
</head>
<body>
  {template 'paome/run/share-tips'}
  <nav class="gray-nav" style="background: none">
    <a id="admire" class="on">土豪打赏榜</a>
    <a id="one">最快配速</a>
    <a id="popularity">最具人气跑者</a>
  </nav>
  <p id="text" class="bg_gray_light p10 lh23 ac f14">
    竞赛期间使用正能量支持俱乐部，累计投入正能量排名前3名将获得“跑么杯土豪”勋章
  </p>
  <p id="title" class="ar p10 color_gray f12 line-gray">累积支持</p>
  <dl id="bodyData-box" style="padding-bottom: 100px;"></dl>
  <script id="bodyData" type="text/html">
  <ul class="praise-list admire">
    <%for(var q=0; q<result.energyList.length;q++){%>
    <li class="user" data-id="<%=result.energyList[q].uid%>">
      <span class="num"><%if(q>2){%><%=q+1%><%}%></span>
      <!-- <img src="<%=result.energyList[q].header%>"> -->
      <img src="<%if(result.energyList[q].header){%><%=result.energyList[q].header%><%}else{%>/static/images/bg/group_image_nor-min.png<%}%>"/>
      <%=result.energyList[q].nickname%>

      <span class="praise"><%=result.energyList[q].total_energy%></span>
    </li>
    <%}%>
  </ul>
  <!-- 土豪打赏 -->
  <ul class="one praise-list" style="display: none;">
    <%for(var q=0; q<result.speedtList.length;q++){%>
    <li class="user" data-id="<%=result.speedtList[q].uid%>">
      <span class="num" ><%if(q>2){%><%=q+1%><%}%></span>
      <!-- <img src="<%=result.maxMileageList[q].header%>"> -->
      <img src="<%if(result.speedtList[q].header){%><%=result.speedtList[q].header%><%}else{%>/static/images/bg/group_image_nor-min.png<%}%>"/>
      <%=result.speedtList[q].nickname%>
      <span class="praise"><%=result.speedtList[q].speed%></span>
    </li>
    <%}%>
  </ul>
  <!-- 最远距离更改为配速 -->
  <ul class="popularity praise-list" style="display: none;">
    <%for(var q=0; q<result.sentimentList.length;q++){%>
    <li class="user" data-id="<%=result.sentimentList[q].uid%>" >
      <span class="num"><%if(q>2){%><%=q+1%><%}%></span>
      <!-- <img src="<%=result.sentimentList[q].header%>"> -->
      <img src="<%if(result.sentimentList[q].header){%><%=result.sentimentList[q].header%><%}else{%>/static/images/bg/group_image_nor-min.png<%}%>"/>
      <%=result.sentimentList[q].nickname%>
      <span class="praise"><%=result.sentimentList[q].support_num%></span>
    </li>
    <%}%>
  </ul>
  <!-- 最具人气 -->
  </script>
  {template 'paome/run/tier-energy'}
<!-- 打赏点赞 -->
</body>
<script type="text/javascript">
  $(function(){
      $.getJSON("{$staticHost}/paome_hall/hallOfFame", {}, function(data, error) { 
         for(x in data.result.maxMileageList){
            data.result.maxMileageList[x].max_mileage = Number(data.result.maxMileageList[x].max_mileage).toFixed(2)
         }
        var html = template('bodyData', data);
        document.getElementById('bodyData-box').innerHTML = html;
        ljj();
        var tab = getParam('tab');
        if(tab == 'mileage') {
          $('#one').click()
        }
        if(tab == 'renqi') {
          $('#popularity').click()
        }
      })
      
  })

  function getParam(par){
      var local_url = document.location.href; 
      var get = local_url.indexOf(par +"=");
      if(get == -1){
          return false;   
      }   
      var get_par = local_url.slice(par.length + get + 1);    
      var nextPar = get_par.indexOf("&");
      if(nextPar != -1){
          get_par = get_par.slice(0, nextPar);
      }
      return get_par;
  }
  $("#admire").click(function(){
    $(".one,.popularity").hide();
    $(".admire").show();
    $("#one,#popularity").removeClass("on");
    $("#admire").addClass("on");
    $("#text").html('竞赛期间使用正能量支持俱乐部，累计投入正能量排名前3名将获得“跑么杯土豪”勋章')
    $("#title").html('累积支持')
  })

  $("#one").click(function(){
    $(".admire,.popularity").hide();
    $(".one").show();
    $("#admire,#popularity").removeClass("on");
    $("#one").addClass("on");
    $("#text").html('竞赛期间参与者单次里程≥3km的配速排名前3可获得“跑么杯最快配速”勋章');
    $("#title").html('最快配速')
  })
  $("#popularity").click(function(){
    $(".admire,.one").hide();
    $(".popularity").show();
    $("#admire,#one").removeClass("on");
    $("#popularity").addClass("on");
    $("#text").html('竞赛期间参赛获得点赞和正能量支持最多的前3名用户');
    $("#title").html('人气（赞+正能量）')
  })
</script>
</html>


{template 'show/web-footer'}